<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="/JSP/Common/head.jsp"%>
<div class="nowPosition">你所在的位置是订单管理</div>
<div class="order-div">
    <form action="${pageContext.request.contextPath }/JSP/ord.go" method="get" style="float: left;">
        <input name="method" value="getOrdList" class="input-text" type="hidden">
        名称：<input type="text" class="txtclick order-input-text inshadow" id="queryOrdName" name="queryOrdName" value="" />
        公司：

        <select name="querySupId" class="order-select inshadow">
            <c:if test="${supNames != null }">
                <option value="">--请选择--</option>
                <c:forEach var="name" items="${supNames}">
                    <option <c:if test="${name.supName == querySupName }">selected="selected"</c:if>
                            value="${name.id}">${name.supName}</option>
                </c:forEach>
            </c:if>
        </select>
        是否支付：

        <select name="queryOrdIsPay" class="order-select inshadow">
            <option value="">--请选择--</option>
            <option value="已支付">已支付</option>
            <option value="未支付">未支付</option>
        </select>
        <input type="hidden" id="pageIndex" name="pageIndex"/>
        <input class="order-submit inshadow-white btnclick" type="submit" value="查询"/>
    </form>
    <a class="btnclick order-a inshadow-white float-left" href="${pageContext.request.contextPath}/JSP/orderAdd.jsp"><img src="../../SVG/addUserNofill.svg"/>&nbsp;&nbsp;添加订单</a>
</div>

<table class="order-table" cellspacing="0" cellpadding="0">
    <tr bgcolor="#87CEEB">
        <th width="10%">编号</th>
        <th width="10%">商品名</th>
        <th width="10%">数量</th>
        <th width="10%">单位</th>
        <th width="10%">金额</th>
        <th width="10%">供应商</th>
        <th width="10%">支付</th>
        <th width="15%">描述</th>
        <th width="15%">操作</th>
    </tr>
    <c:forEach var="ord" items="${ordList }" varStatus="status">
        <tr>
            <td>
                <span title="${ord.ordCode }">${ord.ordCode }</span>
            </td>
            <td>
                <span title="${ord.ordName }">${ord.ordName }</span>
            </td>
            <td>
                <span title="${ord.count}">${ord.count}</span>
            </td>
            <td>
                <span title="${ord.unit}">${ord.unit}</span>
            </td>
            <td>
                <span title="${ord.totalPrice}">${ord.totalPrice}</span>
            </td>
            <td>
                <span title="${ord.supName}">${ord.supName}</span>
            </td>
            <td>
                <span title="${ord.isPay}">${ord.isPay}</span>
            </td>
            <td>
                <span title="${ord.describe}">${ord.describe}</span>
            </td>
            <td>
                <span><a class="ordInformation" href="javascript:;" ordId=${ord.id } ordName=${ord.ordName }><img src="${pageContext.request.contextPath }/SVG/selectUser.svg" title="查看" alt="查看" /></a></span>
                <span><a class="updateOrd" href="javascript:;" ordId=${ord.id } ordName=${ord.ordName }><img src="${pageContext.request.contextPath }/SVG/updateUser.svg" title="修改" alt="修改" /></a></span>
                <!--<span><a class="deleteSup" href="javascript:;" supId=${order.id } supName=${order.supName }><img src="${pageContext.request.contextPath }/SVG/delUser.svg" title="删除" alt="删除" /></a></span>-->
                <!--<c:if test="${nowUserRole <= user.userRole}">
                    <c:if test="${nowUserRole < user.userRole || nowUserRole == 1}">
                    </c:if>
                </c:if>-->
            </td>
        </tr>
    </c:forEach>
</table>
<input type="hidden" id="pageCount" value="${pageCount}"/>
<%@ include file="/JSP/Common/paging.jsp"%>
<%@ include file="/JSP/Common/foot.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/JS/orderList.js" ></script>